﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using BoostSite.Demo.Definitions.Templates.PropertyBlockTypes.Navigation;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.DataAnnotations;

namespace BoostSite.Demo.Definitions.Templates.SharedBlockTypes.General
{	
	[ContentType(GUID = "9E4C0D85-1139-48EA-B905-67C08BEE3C69",
			    DisplayName = "Site Settings",
				Description = "Configuration properties",
				GroupName = BlockGroupNames.Settings,
				Order = 1)] 
	public class SiteConfigurationBlock : BlockData
	{
		#region Configuration		
		
		[Display(
			Name = "Website Title",
			Description = "",
			GroupName = TabNames.Content,
			Order = 1)]
		public virtual string SiteTitle { get; set; }

		[Display(
			Name = "Copyright text ({year} replacement)",
			Description = "",
			GroupName = TabNames.Content,
			Order = 90)]
		public virtual string m_Copyright { get; set; }

		public virtual string Copyright
		{
			get { return m_Copyright == null ? null : m_Copyright.Replace("{year}", DateTime.Now.Year.ToString()); }
		}

		#endregion

		#region Pages


		[Display(
		Name = "Error Page",
		Description = "",
		GroupName = TabNames.Pages,
		Order = 30)]		
		public virtual PageReference ErrorPage { get; set; }


		#endregion


		#region Footer

		[Display(
			Name = "Footer Text",
			Description = "",
			GroupName = TabNames.Content,
			Order = 20)]
		public virtual XhtmlString FooterText { get; set; }

		[Display(GroupName = TabNames.Footer,
			Name = "Column 1",
			Description = "Column 1 Links",
			Order = 10)]
		public virtual LinkListWithTitle FooterLinksColumn1 { get; set; }

		[Display(GroupName = TabNames.Footer,
			Name = "Column 2",
			Description = "Column 2 Links", 
			Order = 11)]
		public virtual LinkListWithTitle FooterLinksColumn2 { get; set; }

		[Display(GroupName = TabNames.Footer,
			Name = "Column 3",
			Description = "Column 3 Links",
			Order = 12)]
		public virtual LinkListWithTitle FooterLinksColumn3 { get; set; }

		#endregion


	}
}
